package com.jfs.zlk.entity;

import com.jfs.zlk.enums.ZlkResultCode;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @Description zlk流媒体服务器返回统一结果集类
 * @E-mail cwm3412638@163.com
 * @Author cwm
 * @Date 2022/7/27
 */

@Data
@AllArgsConstructor
public class ZlkResult<T> {
    public ZlkResult(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * 返回码
     * {@link ZlkResultCode}
     */
    private Integer code;
    /**
     * 响应消息
     */
    private String msg;
    /**
     * 响应数据
     */
    private T data;

    public static ZlkResult Ok() {
        return new ZlkResult(0, "success");
    }
}
